home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-07-26 | 5.2 KB | 127 lines | [TEXT/MPS ] |
- ********************************************************************************
-
- CallFinder - send an AppleEvent to the Finder
-
- CallFinder communicates with the Finder, using AppleEvents. The tool follows
- the guidelines for Finder Events in the AppleEvent Registry, allowing users
- to enter the ID and the parameters of the AppleEvent. CallFinder thus allows
- many Finder functions to be controlled from MPW, and can be considered a step
- towards User Scripting. The Commando interface for this tool is fully
- implemented; the only external information required is the event ID itself
- (a list of which can be printed by calling CallFinder without parameters).
-
- Note: this tool requires at least System 7 and MPW 3.3. Users of earlier
- versions of MPW may use this tool with modification to MPW. (see below)
-
- ********************************************************************************
-
- NOTE TO USERS OF MPW 3.2 AND EARLIER: In order to send AppleEvents from MPW,
- you must set the "High-level event aware" bit in the 'SIZE' resource (id -1)
- of your MPW Shell. If this bit is Ø, CallFinder will have no effect on the
- Finder. The side effect of setting this bit for pre-3.3 MPW is that you will
- be unable to open MPW documents from the System 7 Finder.
-
- MPW 3.3, when released, should already have this bit set.
-
- ********************************************************************************
-
- Usage: CallFinder [option…]
-
- pathname Specify a file or folder for the Finder. This is referred to
- as the 'selection', and is the subject of any action.
- -d pathname Specify the destination folder. This is where the file/folder
- is copied or moved to.
- -e type Specify an event ID. The parameter is a 4 character string
- -k number Specify a keyword for the AppleEvent. The parameter is a long
- integer.
- -h number Specify a horizontal coordinate or offset. The parameter is a
- short integer.
- -v number Specify a vertical coordinate or offset. The parameter is a
- short integer.
- -g Specify the Get Info window of the selection.
- -s Specify the Sharing window of the selection.
- -m Stay in MPW, without switching to the Finder.
- -c Allow a custom event to be sent, by disabling parameter
- checking by this tool. CAUTION - this is an untested feature.
- Note for AE Registry readers: Custom events will use the
- enclosing folder parameter, not the FWindow parameter.
-
- ********************************************************************************
-
- 7.0 Finder Events
-
- Event ID Finder Action Parameters Required
- ————————————————————————————————————————————————————————
- 'abou' About This Macintosh… none
- 'view' Change window view selection, keyword
- 'clos' Close window selection
- 'drag' Copy selection to dest selection, destination
- 'sdup' Duplicate selection
- 'empt' Empty trash none
- 'sinf' Get Info selection
- 'grow' Grow window selection, h & v coordinates
- 'sali' Make alias selection
- 'move' Move selection to dest selection, destination
- 'sope' Open selection selection
- 'pgsu' Page Setup… selection
- 'posn' Position window selection, h&v coordinates
- 'spri' Print selection selection
- 'pwin' Print window selection
- 'sput' Put Away selection
- 'rest' Restart none
- 'srev' Reveal selection selection
- 'sprv' Sharing… selection
- 'shcl' Show clipboard none
- 'shut' Shutdown none
- 'slep' Sleep none
- 'zoom' Zoom window selection, keyword
-
- Event / Parameter notes:
- 'drag',
- 'move': H&V parameters specify the item's coordinates in the destination.
- 'grow': The h&v parameters specify the new size of the window.
- 'posn': The h&v parameters specify the new location of the window.
- 'slep' Only works if the Finder has a "Sleep" command available.
- 'srev' Reveals the specified file/folder in the Finder by opening its
- parent folder and selecting the item.
- 'view': The keywords for the window view are:
- Small Icon 0 Icon 1
- Name 2 Date 3
- Size 4 Kind 5
- Comment 6 Label 7
- Version 8
- 'zoom': The keywords for zooming windows are:
- Zoom current size 7
- Zoom full size 8
-
- ********************************************************************************
-
- CallFinder ideas:
-
- • Play a sound when a compile is finished:
- CallFinder 'HD:Sounds:Excellent!' -e sope -m (Try adding to a make file)
-
- • Display the current window's folder in the Finder (VERY useful)
- CallFinder "{active}" -e srev
-
- • Open an alias to a remote volume
- CallFinder 'HD:Aliases:DTS Goodies on Dev CD alias' -e sope
-
- • Print a folder's contents
- CallFinder 'HD:Source:' -e sope -m # Opens the folder in the Finder
- CallFinder 'HD:Source:' -e zoom -k 8 -m # Zooms window to show all files
- CallFinder 'HD:Source:' -e view -k 2 -m # Changes view to 'View by Name'
- CallFinder 'HD:Source:' -e pwin # Calls Print Window…
-
- • Print a file's Get Info window
- CallFinder 'HD:MyApp' -e sinf -m # Calls Get Info… for MyApp
- CallFinder 'HD:MyApp' -e pwin -g # Calls Print Window…
-
- ********************************************************************************
-
- CallFinder 1.0 7/26/91
- by Jason Swartz
- Developed at Apple Computer
- Dept. 27/5752, Apple SQE
- Thanks to Dennis Gately & Don Olson for their help with Finder events
-